package javabasics.designpattern.aop.dynamicproxy;

/**
 * @Author suxiaoxiao
 * @Date 2019/5/31 0:16
 * @Version 1.0
 */
public class CglibTest {

    public static void main(String[] args) {
        long starttime = System.currentTimeMillis();
        IDBQuery idbQuery = CglibDbQueryInterceptor.createCglibProxy();
        System.out.println("创建对象耗时:" + (System.currentTimeMillis() - starttime));
        starttime = System.currentTimeMillis();
        for (int i = 0; i < 30000000; i++) {
            idbQuery.request();
        }
        System.out.println("执行耗时:" + (System.currentTimeMillis() - starttime));
    }



}


